package org.example;




import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

public class CommidityImportSelector implements ImportSelector {

    @Override
    public String[] selectImports(AnnotationMetadata importingClassMetadata) {
        //字符串数组存的是  待托管的bean的全路径名.
        //SPI: 服务提供接口
        //TODO: 利用 IO机制扫描一个路径 /META-INF/spring.factories

        String[] beans=new String[]{"com.zy.utils.Apple",
                "com.zy.utils.Watermelon",
                "com.zy.bean.Orders",
                "com.zy.bean.Product"};
        return beans;
    }

    @Configuration
    @ComponentScan(basePackages = "com.zy.bean3")
    public static class AppConfig6_conditional {
    }
}
